#include "ax_set.h"
#include <stdio.h>
#include <assert.h>
#include "ax_printf.h"
int main(int argc, char* argv[])
{
    ax_set* s = ax_set_create(AX_SET_CONST_VALUE);
    ax_set_insert(s, "foo", 3);
    ax_set_insert(s, "bar", 3);
    ax_set_insert(s, "dog", 3);

    assert(ax_set_contains(s, "foo", 3));
    assert(ax_set_contains(s, "bar", 3));
    assert(ax_set_contains(s, "dog", 3));

    ax_set_remove(s, "bar", 3);
    assert(!ax_set_contains(s, "bar", 3));

    char* data;
    ax_set_foreach(data, s)
    {
        ax_debug("data:%s\n", data);
    }

    ax_debug("set size:%d\n", ax_set_size(s));
    ax_set_clear(s);
    assert(ax_set_size(s) == 0);

    ax_set_destory(s);
    return 0;
}
